package com.bingxue.edu.management.education.model.resp;

import com.bingxue.edu.management.education.model.entity.ClassInfo;
import com.bingxue.edu.management.education.model.entity.Enrollment;
import com.mybatisflex.annotation.RelationManyToOne;
import com.mybatisflex.annotation.TableRef;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 报名信息分页返回
 *
 * @author zq
 * @since 2024/08/21 00:02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "报名信息")
@TableRef(Enrollment.class)
public class EnrollmentResp extends Enrollment {

    @Schema(description = "学生信息")
    private StudentNameResp student;

    @Schema(description = "班级信息")
    private ClassInfo classInfo;

    @Schema(description = "主讲老师id")
    private String leadTeacherId;

    @Schema(description = "主讲老师名称")
    @RelationManyToOne(selfField = "leadTeacherId", targetTable = "base_employee", targetField = "id", valueField = "name")
    private String leadTeacherName;

    @Schema(description = "课程顾问")
    @RelationManyToOne(selfField = "sellerId", targetTable = "base_employee", targetField = "id", valueField = "name")
    private String sellerName;

    @Schema(description = "校区id")
    private String campusId;

    @RelationManyToOne(selfField = "campusId", targetTable = "base_org", targetField = "id", valueField = "name")
    @Schema(description = "校区名称")
    private String campusName;
}
